#!/usr/bin/env python
# Create: 2019/1/17
__author__ = '749B'

COURSE = "机器学习理解与实战"
PRICE = 18  # RMB

p0 = {'url_info': [("宣传片", "https://media.wanmen.org/556a5f19-9ace-4dd3-9def-cfd2f19f3db8_pc_mid")]}

p1 = {'name': "第1讲 机器学习理解与实战", 'url_info': [
    ("1.1 监督学习", "https://media.wanmen.org/ffb09202-5af6-4cb1-b07e-037e4228b37a_pc_mid"),
    ("1.2 分类问题", "https://media.wanmen.org/cf5a323c-8618-4de0-9b66-3d783b82ddf1_pc_mid"),
    ("1.3 过拟合", "https://media.wanmen.org/794612e1-6231-437b-8c3d-8aedc2c6a954_pc_mid"),
    ("1.4 回归问题", "https://media.wanmen.org/c4d91fd6-ed70-4f8a-a519-7592b756480a_pc_mid"),
    ("1.5 神经网络", "https://media.wanmen.org/c886396a-64ed-4386-9313-5c461b532cdb_pc_mid"),
    ("1.6 总结与答疑", "https://media.wanmen.org/77eb1eea-f91c-4915-bea9-83f7a1771dfd_pc_mid"),
]}

parts = [p0, p1]
URLS = [(part.get('name'), item[0], item[1]) for part in parts for item in part.get('url_info')]

if __name__ == '__main__':
    from utils import check_url
    starts = 'https://media.wanmen.org/'
    ends = '_pc_mid'
    check_url.check([i[2] for i in URLS], starts, ends)
    print("视频数量:", len(URLS))


